<style>

.dtable{display:table;width:auto;margin:0px auto;}
.drow{display:table-row;height:28px;line-height:28px;}
.dlcell{display:table-cell;text-align:right;width:150px;}
.drcell{display:table-cell;text-align:left;width:750px;padding-left:10px;}

.checkbox{padding:0px;margin:0px;vertical-align:middle;}

</style>
<script charset="utf-8" src="/res/lib/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="/res/lib/kindeditor/zh_CN.js"></script>
<script type="text/javascript">
jQuery(function(){
	$('#lang').change(function(){
		$.get('/admin.php?mo=action&domo=news&do=getCategoryList&lang='+$(this).val()+'&ajax=1', function(data){
			$('#cid').empty();
			$.each(data, function(i,n) {
				$('<option value="'+n.id+'">'+n.name+'</option>').appendTo('#cid');
			});
		}, 'json');
	});
	
});
var editor;
KindEditor.ready(function(K) {
	editor = K.create('textarea[name="note"]', {
		resizeType : 1,
		allowPreviewEmoticons : true,
		allowFileManager : true,
		allowImageUpload : true,
		//cssPath : '../plugins/code/prettify.css',
		uploadJson : '/admin.php?mo=kindeditorUploadJson',
		fileManagerJson : '/admin.php?mo=kindeditorFileManagerJson',
		items : [
			'source', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
			'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
			'insertunorderedlist', '|', 'emoticons', 'image', 'link']
	});
});
</script>
<div id="main">
    <div class="dtable">
		<form action="admin.php?mo=action&domo=site&do=save" method="post" enctype="multipart/form-data" name="form1" id="form1">
        <input type="hidden" name="id" id="id" value="{$detail['id']}" />
        <div class="drow">
            <span class="dlcell">更新代码: </span>
            <span class="drcell">
           	<select id="updatecode" name="updatecode">
                {loop $yes_no $k $v}
                <option value="{$k}"{if $k==1} selected="selected"{/if}>{$v}</option>
                {/loop}
                </select>
            </span>
        </div>
      <div class="drow">
            <span class="dlcell">站点分类: </span>
            <span class="drcell">
            	<select id="cid" name="cid">
                {loop $categoryList $k $v}
                <option value="{$v['id']}"{if $v['id']==$detail['cid']} selected="selected"{/if}>{$v['name']}</option>
                {/loop}
                </select>
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">网站名称: </span>
            <span class="drcell">
            	<input type="text" name="name" id="name" value="{$detail['name']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">网站标志符: </span>
            <span class="drcell">
           	<input type="text" name="sign" id="sign" value="{$detail['sign']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">网站域名: </span>
            <span class="drcell">
           	<input type="text" name="domain" id="domain" value="{$detail['domain']}" size="50" maxlength="60" />
            </span>
        </div>
		<div class="drow">
            <span class="dlcell">使用模板: </span>
            <span class="drcell">
            	<select id="theme" name="theme">
                {loop $themList $k $v}
                <option value="{$k}"{if $k==$detail['theme']} selected="selected"{/if}>{$v}</option>
                {/loop}
                </select>
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">{$SelectLangVersionText}: </span>
            <span class="drcell">
                {loop $langList $k $v}
                {if $detail['id']}
            <input name="lang[]" id="lang" type="checkbox" value="{$k}" class="checkbox"{if in_array($k, $detail['lang'])} checked="checked"{/if} /> {$v}&nbsp;&nbsp;&nbsp;
                {else}
                <input name="lang[]" id="lang_{$k}" type="checkbox" value="{$k}" class="checkbox"{if $k=='zh-cn'} checked="checked"{/if} /> {$v}&nbsp;&nbsp;&nbsp;
                {/if}
                {/loop}
          </span>
        </div>
        <div class="drow">
            <span class="dlcell">默认语言: </span>
            <span class="drcell">
            	<select id="default_lang" name="default_lang">
                {loop $langList $k $v}
                <option value="{$k}"{if $k==$detail['default_lang']} selected="selected"{/if}>{$v}</option>
                {/loop}
                </select>
          </span>
        </div>
        <div class="drow">
            <span class="dlcell">包含模块: </span>
            <span class="drcell">
                {loop $moduleList $k $v}
                {if $detail['id']}
            <input name="module_list[]" id="module_list" type="checkbox" value="{$k}" class="checkbox"{if in_array($k, $detail['module_list'])} checked="checked"{/if} /> {$v['name']}&nbsp;&nbsp;&nbsp;
                {else}
                <input name="module_list[]" id="module_list" type="checkbox" value="{$k}" class="checkbox"{if $v['default']} checked="checked"{/if} /> {$v['name']}&nbsp;&nbsp;&nbsp;
                {/if}
                {/loop}
          </span>
        </div>
        
        <hr />
        <div class="drow">
            <span class="dlcell">管理员账号: </span>
            <span class="drcell">
           	<input type="text" name="admin_name" id="admin_name" value="{$detail['admin_name']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">管理员密码: </span>
            <span class="drcell">
           	<input type="text" name="admin_pass" id="admin_pass" value="{$detail['admin_pass']}" size="50" maxlength="60" />
            </span>
        </div>
        
        <hr />
        <div class="drow">
            <span class="dlcell">邮件服务器: </span>
            <span class="drcell">
           	<input type="text" name="smtp_host" id="smtp_host" value="{$detail['smtp_host']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">邮件服务器使用安全链接: </span>
            <span class="drcell">
           	<select name="smtp_ssl" id="smtp_ssl">
           	  <option value="1">是</option>
           	  <option value="0" selected="selected">否</option>
       	    </select>
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">邮件服务器端口: </span>
            <span class="drcell">
           	<input type="text" name="smtp_port" id="smtp_port" value="{$detail['smtp_port']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">发件人姓名: </span>
            <span class="drcell">
           	<input type="text" name="smtp_fromname" id="smtp_fromname" value="{$detail['smtp_fromname']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">发送邮件EMAIL: </span>
            <span class="drcell">
           	<input type="text" name="smtp_email" id="smtp_email" value="{$detail['smtp_email']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">SMTP账号: </span>
            <span class="drcell">
           	<input type="text" name="smtp_user" id="smtp_user" value="{$detail['smtp_user']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">SMTP密码: </span>
            <span class="drcell">
           	<input type="text" name="smtp_pass" id="smtp_pass" value="{$detail['smtp_pass']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">回复客户留言邮件标题模板: </span>
            <span class="drcell">
           	<input type="text" name="subject_tpl" id="subject_tpl" value="{$detail['subject_tpl']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">回复客户留言邮件内容模板: </span>
            <span class="drcell">
           	<input type="text" name="body_tpl" id="body_tpl" value="{$detail['body_tpl']}" size="50" maxlength="60" />
            </span>
        </div>
        
        <hr />
        <div class="drow">
            <span class="dlcell">数据库服务器地址: </span>
            <span class="drcell">
           	<input type="text" name="db_host" id="db_host" value="{$detail['db_host']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">数据库名称: </span>
            <span class="drcell">
           	<input type="text" name="db_name" id="db_name" value="{$detail['db_name']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">数据库用户名: </span>
            <span class="drcell">
           	<input type="text" name="db_user" id="db_user" value="{$detail['db_user']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">数据库密码: </span>
            <span class="drcell">
           	<input type="text" name="db_pass" id="db_pass" value="{$detail['db_pass']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">数据库编码: </span>
            <span class="drcell">
           	<input type="text" name="db_charset" id="db_charset" value="{$detail['db_charset']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">程序系统编码: </span>
            <span class="drcell">
           	<input type="text" name="app_charset" id="app_charset" value="{$detail['app_charset']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">服务器的时区: </span>
            <span class="drcell">
           	<input type="text" name="date_default_timezone" id="date_default_timezone" value="{$detail['date_default_timezone']}" size="50" maxlength="60" />
            </span>
        </div>
        <div class="drow">
            <span class="dlcell">表前缀: </span>
            <span class="drcell">
           	<input type="text" name="tbl_pre" id="tbl_pre" value="{$detail['tbl_pre']}" size="50" maxlength="60" />
            </span>
        </div>
        
        <hr />
        <div class="drow">
            <span class="dlcell">备注: </span>
            <span class="drcell">
            <textarea id="note" name="note" style="width:700px;height:200px;visibility:hidden;">{$detail['note']}</textarea>
            </span>
        </div>
        <div class="drow">
            <span class="dlcell"></span>
            <span class="drcell">
            <input type="submit" value="{$SubmitText}" />
            </span>
        </div>
        </form>
    </div>
</div>